package cn.tedu.spring.h2;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test0101 {
    @Test
    public void t1()
    {
        //作业二
        //产生错误的自动注入 ByType
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        D1 demo1=(D1) applicationContext.getBean("d1");
        System.out.println(demo1);
        ((ClassPathXmlApplicationContext)applicationContext).close();
    }
}
